package com.sinooceangroup.capital.sentinel.service.impl;

import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * SentinelResource blockHandlerClass 属性 对应的处理类实现
 *
 * @author: Leo.Wang, adwyxx@qq.com
 * @date: 2020/8/5 14:28
 */
public class SentinelBlockHandler {
    public static String sayHelloBlockHandler(String name, BlockException bex) {
        return "exceptionRatio被限制访问了："+name+" w(ﾟДﾟ)w";
    }

    public static String blockHandler(String value, BlockException bex) {
        System.out.println(bex);
        return "exceptionRatio被限制访问了："+value + " w(ﾟДﾟ)w";
    }

    public static String exceptionRatioBlockHandler(BlockException bex) {
        return "exceptionRatio被限制访问了：w(ﾟДﾟ)w";
    }

    public static String rtBlockHandler(BlockException bex) {
        return "rt被限制访问了：w(ﾟДﾟ)w";
    }
}
